package com.mszlu.blog.service;

import com.mszlu.blog.dao.pojo.SysUser;
import com.mszlu.blog.vo.Result;
import com.mszlu.blog.vo.params.LoginParam;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 李
 * @Date: 2022/03/22/15:25
 * @Description:
 */
@Transactional
public interface LoginService {
    /**
     * 登录
     * @param loginParam
     * @return
     */
    Result login(LoginParam loginParam);
    /**
     * 验证token是否合法
     * @param token
     * @return
     */
    SysUser checkToken(String token);
    /**
     * 退出登陆
     * @param token
     * @return
     */
    Result logout(String token);
    /**
     * 账号注册
     * @param loginParam
     * @return
     */
    Result register(LoginParam loginParam);

}
